package com.xinchuang.controller.targetSystem;

import com.alibaba.fastjson.JSONObject;
import com.xinchuang.common.Result;
import com.xinchuang.service.targetSystem.FeatureService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * TODO 特性分析
 *
 * @author zkwczx
 * @version 1.0
 * @date 2024/3/12 15:19
 */
@RestController
@RequestMapping(value = "/feature")
@RequiredArgsConstructor
public class FeatureController {

    private final FeatureService featureService;

    @GetMapping(value = "/targetSubPull")
    public Result targetSubPull(@RequestParam(value = "targetId") String targetId) {
        return featureService.targetSubPull(targetId);
    }

    @PostMapping(value = "/targetFeatureAlgorithmOne")
    public Result targetFeatureAlgorithmOne(@RequestBody JSONObject json) {
        return featureService.targetFeatureAlgorithmOne(json);
    }

    @GetMapping(value = "/systemsTargetPull")
    public Result systemsTargetPull(@RequestParam(value = "sysId") String sysId) {
        return featureService.systemsTargetPull(sysId);
    }

    @PostMapping(value = "/systemFeatureAlgorithmOne")
    public Result systemFeatureAlgorithmOne(@RequestBody JSONObject json) {
        return featureService.systemFeatureAlgorithmOne(json);
    }

    @PostMapping(value = "/systemFeatureAlgorithmTwo")
    public Result systemFeatureAlgorithmTwo(@RequestBody JSONObject json) {
        return featureService.systemFeatureAlgorithmTwo(json);
    }

    @PostMapping(value = "/systemFeatureAlgorithmThree")
    public Result systemFeatureAlgorithmThree(@RequestBody JSONObject json) {
        return featureService.systemFeatureAlgorithmThree(json);
    }

}
